<template>
  <div class="Footer">
    <footer id="footer">
      <div class="footer-box">
        <div class="footer-left">
          <img src="../assets/img/logo_w.png" alt="" class="logo">
          <p class="mb">筋斗云投票-免费第三方专业微信投票活动制作平台</p>
          <p> @2022 All rights reserved 南昌筋斗云文化传媒有限公司</p>
        </div>
        <div class="footer-center">
          <div class="logo-box">
            <img src="../assets/img/tx.png" alt="">
            <img src="../assets/img/chengxin.png" alt="">
          </div>
          <p class="record" v-if="config.beian">ICP备案号：{{config.beian}}</p>
          <p class="record" v-if="config.email">企业邮箱：{{config.email}}</p>
          <p class="record">
            <img src="../assets/img/ga.png" class="gaimg" />
            <a href="http://www.beian.gov.cn/portal/registerSystemInfo?recordcode=36010902000635" class="galink" target="_blank">赣公网安备 36010902000635号</a>
          </p>
        </div>
        <div class="footer-right">
          <div class="qrcode-box" v-if="config.qrcode">
            <img :src="config.qrcode" alt="公众号二维码" class="kf-qrcode">
            <p class="qrcode-tips">公众号二维码</p>
          </div>
          <div class="contact-way">
            <p v-if="config.phone1 || config.phone2">客服电话</p>
            <p v-if="config.phone1">电话：{{config.phone1}}</p>
            <p v-if="config.phone2">电话：{{config.phone2}}</p>
            <a href="/Helper?id=11" target="_blank">
              <p class="record">关于我们</p>
            </a>
          </div>
        </div>
      </div>
    </footer>
    <div class="fix_right">
      <el-popover trigger="hover" placement="left">
        <div class="pop_content pop_grid">
          <div class="grid_item" style="margin-right:10px;">
            <img src="../assets/img/qr1.jpg" />
            <b>客服</b>
            <p>7*24小时服务</p>
          </div>
          <div class="grid_item">
            <img src="../assets/img/qr2.jpg" />
            <b>客服</b>
            <p>7*24小时服务</p>
          </div>
        </div>
        <div class="fix_item item_qr" slot="reference">
          <i class="fa fa-qrcode" aria-hidden="true"></i>
        </div>
      </el-popover>
      <el-popover trigger="hover" placement="left">
        <div class="pop_content">
          <p><b>客服电话</b></p>
          <p>电话：{{config.phone1}}</p>
          <p>电话：{{config.phone2}}</p>
        </div>
        <div class="fix_item item_phone" slot="reference">
          <i class="fa fa-phone" aria-hidden="true"></i>
        </div>
      </el-popover>
      <div class="fix_item item_up" @click="goTop">
        <i class="el-icon-arrow-up" aria-hidden="true"></i>
      </div>
    </div>
  </div>
</template>

<script>
import Ajax from '../../utils/ajax'
export default {
  name: 'Footer',
  data() {
    return {
      config: {}
    }
  },
  created() {
    //this.isHome = this.$route && this.$route.path == '/';
    this.getConfig()
  },
  methods: {
    getConfig() {
      Ajax.get('common/webconfig')
        .then((res) => {
          if (res.code == 0) {
            if (res.data) {
              this.config = res.data.config
            }
          }
        })
        .catch((err) => {
          console.error(err)
        })
    },
    // 回到顶部
    goTop() {
      window.scrollTo(0, 0)
    }
  }
}
</script>
<style scoped>
@import '../assets/css/footer.css';
</style>
